<section class="main">
    <div id="divMain">
        <div class="divHeader2" style="padding-left: 38px; background: transparent url('/resources/system/image/common/user_32.png') no-repeat scroll 3px 9px / 32px auto;">用户编辑</div>
        <div class="SubMenu"></div>
        <div class="edit tag_edit" id="divMain2">
            <form action="/system/management/user-edit.html" method="post" name="edit" id="edit">
                <input type="hidden" value="$!model.id" name="id" id="edtID">
                <p>
                    <span class="title">用户级别:</span><br>
                    <select id="cmbLevel" name="role" size="1" class="edit">
                        <option selected="selected" value="$!model.role">管理员</option>
                        <option value="2">网站编辑</option>
                        <option value="3">作者</option>
                        <option value="4">协作者</option>
                        <option value="5">评论者</option>
                        <option value="6">游客</option>
                    </select>
                </p>
                <p>
                    <span class="title">名称:</span><span class="star">(*)</span><br>
                    <input type="text" value="$!model.name" maxlength="20" name="name" size="40" class="edit" id="edtName">
                </p>
                <p>
                    <span class="title">密码:</span><br>
                    <input type="password" value="$!model.password" name="password" size="40" class="edit" id="edtPassword">
                </p>
                <p>
                    <span class="title">确认密码:</span><br>
                    <input type="password" value="" name="PasswordRe" size="40" class="edit" id="edtPasswordRe">
                </p>
                <p>
                    <span class="title">别名:</span><br>
                    <input type="text" value="$!model.alias" name="alias" size="40" class="edit" id="edtAlias"></p>
                <p>
                    <span class="title">邮箱:</span><span class="star">(*)</span><br>
                    <input type="text" value="$!model.email" name="email" size="40" class="edit" id="edtEmail"></p>
                <p>
                    <span class="title">摘要:</span><br>
                    <textarea style="width:600px;" name="intro" id="edtIntro" rows="6" cols="3">$!model.intro</textarea>
                </p>
                <div class="editmod2" id="response"></div>
                <p><span class="title">默认头像:</span>&nbsp;<br>/resources/system/image/admin/0.png</p>
                <p><input type="submit" onclick="return checkInfo();" id="btnPost" value="提交" class="button"></p>
            </form>
            <script type="text/javascript">
                function checkInfo(){
                    if(!$("#edtEmail").val()){
                        alert("邮箱格式不正确，可能过长或为空");
                        return false
                    }
                    if(!$("#edtName").val()){
                        alert("名称不能为空或格式不正确");
                        return false
                    }
                    if($("#edtPassword").val()!==$("#edtPasswordRe").val()){
                        alert("请确认密码是否设置正确");
                        return false
                    }
                    $("#edtPassword").val(MD5($("#edtPassword").val()));
                }
            </script>
            <script type="text/javascript">ActiveLeftMenu("aMemberMng");</script>
            <script type="text/javascript">AddHeaderIcon("/resources/system/image/common/user_32.png");</script>
        </div>
    </div>

</section>